#pragma once

#include "photon.h"

class light
{
public:

	color	ambient;

	double	multiplyier;

	double	decayInverseConstParam;
	double	decayInverseLinParam;
	double	decayInverseSqrParam;

	double	ambienCoef;

	point	position;
	vector3	directrion;

	unsigned int maxPhotons;
	unsigned int photonsEmited;

	bool	isAmbient;
	bool	castShadow;
	bool	decay;

	light();
	light(color Color);
	light(float R, float G, float B);
	light(float RGB);

	~light();

	virtual void getLightFromXML(std::ifstream &file);

	void	setAmbient(color amb);
	color	getAmbient();

	void setDecayParams(double constant, double linear, double square);
	virtual void setOrjentation(point poz, vector3 dir);
	virtual void setPosition(point poz);
	virtual void setDirection(vector3 dir);
	virtual point getPosition();
	virtual vector3 getDirection(point directionTo);
	virtual photon emitPhoton();

	inline light* getPointer(){return this;}

protected:
	int		ID;
	void	standardSet();
	
};